The present invention relates to digital representation, processing, storage and transmission of color images. A digital representation of an image can be stored in a storage device (e.g. a computer memory, a digital video recorder, or some other device). Such representation can be transmitted over a network, and can be used to display the color image on a computer monitor, a television screen, a printer, or some other device. The image can be edited using a suitable computer program.
Color is a sensation caused by electromagnetic radiation (light) entering a human eye. The light causing the color sensation is called “color stimulus”. Color depends on the radiant power and spectral composition of the color stimulus, but different stimuli can cause the same color sensation. Therefore, a large number of colors can be reproduced (“matched”) by mixing just three “primary” color stimuli, e.g. a Red, a Blue and a Green. The primary stimuli can be produced by three “primary” light beams which, when mixed and reflected from an ideal diffuse surface, produce a desired color. The color can be represented by its coordinates, which specify the intensities of the primary light beams. For example, in linear RGB color coordinate systems, a color S is represented by coordinates R, G, B which define the intensities of the respective Red, Green and Blue primary light beams needed to match the color S. If P(λ) is the radiance (i.e. the energy per unit of time per unit wavelength) of a light source generating the color S, then the RGB coordinates can be computed as:
                              R          =                                    ∫              0              ∞                        ⁢                                          P                ⁡                                  (                  λ                  )                                            ⁢                                                r                  _                                ⁡                                  (                  λ                  )                                            ⁢                              ⅆ                λ                                                    ⁢                                  ⁢                  G          =                                    ∫              0              ∞                        ⁢                                          P                ⁡                                  (                  λ                  )                                            ⁢                                                g                  _                                ⁡                                  (                  λ                  )                                            ⁢                              ⅆ                λ                                                    ⁢                                  ⁢                  B          =                                    ∫              0              ∞                        ⁢                                          P                ⁡                                  (                  λ                  )                                            ⁢                                                b                  _                                ⁡                                  (                  λ                  )                                            ⁢                              ⅆ                λ                                                                        (        1        )            where r(λ), g(λ), b(λ) are “color matching functions” (CMF's). For each fixed wavelength λ, the values r(λ), g(λ), b(λ) are respectively the R, G and B values needed to match color produced by a monochromatic light of the wavelength λ of a unit radiance. The color matching functions are zero outside of the visible range of the λ values, so the integration limits in (1) can be replaced with the limits of the visible range. The integrals in (1) can be replaced with sums if the radiance P(λ) is specified as power at discrete wavelengths. FIG. 1 illustrates the color matching functions for the 1931 CIE RGB color coordinate system for a 2° field. (CIE stands for “Commission Internationale de l'Eclairage”.) See D. Malacara, “Color Vision and Colorimetry: theory and applications” (2002), and Wyszecki & Stiles, “Color Science: concepts and Methods, Quantitative Data and Formulae” (2nd Ed. 2000), both incorporated herein by reference.
The RGB system of FIG. 1 is called linear because, as shown by equations (1), the R, G, and B values are linear in P(λ). In a linear system, the intensities such as R, G, B are called “tristimulus values”.
As seen from FIG. 1, the function r(λ) can be negative, so the R coordinate can be negative. If R is negative, this means that when the color S is mixed with |R| units of the Red primary, the resulting color matches the mixture of G units of the Green primary with B units of the Blue primary.
New linear color coordinate systems can be obtained as non-degenerate linear transformations of other systems. For example, the 1931 CIE XYZ color coordinate system for a 2° field is obtained from the CIE RGB system of FIG. 1 using the following transformation:
                                          [                                                            X                                                                              Y                                                                              Z                                                      ]                    =                                    A                              RGB                -                XYZ                                      ⁡                          [                                                                    R                                                                                        G                                                                                        B                                                              ]                                      ⁢                                  ⁢                  where          ⁢                      :                                              (        2        )                                          A                      RGB            -            XYZ                          =                              1            0.17697                    ⁡                      [                                                            0.49                                                  0.31                                                  0.20                                                                              0.17697                                                  0.81240                                                  0.01063                                                                              0.00                                                  0.01                                                  0.99                                                      ]                                              (        3        )            This XYZ system does not correspond to real, physical primaries. The color matching functions x(λ), y(λ), z(λ) for this XYZ system are shown in FIG. 2. These color matching functions are defined by the same matrix ARGB-XYZ:
      [                                                      x              _                        ⁡                          (              λ              )                                                                                      y              _                        ⁡                          (              λ              )                                                                                      z              _                        ⁡                          (              λ              )                                            ]    =            A              RGB        -        XYZ              ⁡          [                                                                  r                _                            ⁡                              (                λ                )                                                                                                        g                _                            ⁡                              (                λ                )                                                                                                        b                _                            ⁡                              (                λ                )                                                        ]      The tristimulus values X, Y, Z can be computed from the color matching functions in the usual way:
                              X          =                                    ∫              0              ∞                        ⁢                                          P                ⁡                                  (                  λ                  )                                            ⁢                                                x                  _                                ⁡                                  (                  λ                  )                                            ⁢                              ⅆ                λ                                                    ⁢                                  ⁢                  Y          =                                    ∫              0              ∞                        ⁢                                          P                ⁡                                  (                  λ                  )                                            ⁢                                                y                  _                                ⁡                                  (                  λ                  )                                            ⁢                              ⅆ                λ                                                    ⁢                                  ⁢                  Z          =                                    ∫              0              ∞                        ⁢                                          P                ⁡                                  (                  λ                  )                                            ⁢                                                z                  _                                ⁡                                  (                  λ                  )                                            ⁢                              ⅆ                λ                                                                        (        4        )            
There are also non-linear color coordinate systems. One example is a non-linear sRGB system standardized by International Electrotechnical Commission (IEC) as IEC 61966-2-1. The sRGB coordinates can be converted to the XYZ coordinates (4) or the CIE RGB coordinates (1). Another example is HSB (Hue, Saturation, Brightness). The HSB system is based on sRGB. In the HSB system, the colors can be visualized as points of a vertical cylinder. The Hue coordinate is an angle on the cylinder's horizontal circular cross section. The pure Red color corresponds to Hue=0°; the pure Green to Hue=120°; the pure Blue to Hue=240°. The angles between 0° and 120° correspond to mixtures of the Red and the Green; the angles between 120° and 240° correspond to mixtures of the Green and the Blue; the angles between 240° and 360° correspond to mixtures of the Red and the Blue. The radial distance from the center indicates the color's Saturation, i.e. the amount of White (White means here that R=G=B). At the circumference, the Saturation is maximal, which means that the White amount is 0 (this means that at least one of the R, G, and B coordinates is 0). At the center, the Saturation is 0 because the center represents the White color (R=G=B). The Brightness is measured along the vertical axis of the cylinder, and is defined as max(R,G,B).
Different color coordinate systems are suitable for different purposes. For example, the sRGB system is convenient for rendering color on certain types of monitors which recognize the sRGB coordinates and automatically convert these coordinates into color. The HSB system is convenient for some color editing operations including brightness adjustments.
Brightness can be thought of as a degree of intensity of a color stimulus. Brightness corresponds to our sensation of an object being “bright” or “dim”. Brightness has been represented as the Y value of the XYZ system of FIG. 2, or as the maximum of the R, G and B coordinates of the sRGB coordinate system. Other representations also exist. Hue is the attribute of a color perception denoted by blue, green yellow, red, purple, and so on. See the Wyszecki & Styles book cited above, page 487. The saturation can be thought of as a measure of the white amount in the color.
It is desirable to obtain color coordinate systems which facilitate hue editing and other types of color editing.